﻿<%@ Page Language="C#" MasterPageFile="~/SubForm.Master" AutoEventWireup="true" Codebehind="CAT.aspx.cs"
    Inherits="PreContractWeb.Administration.CAT" Title="CAT Page" EnableEventValidation="false" %>

<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="divError" runat="server" visible="false">
    </div>
    <div id="divConnect" runat="server">
        <asp:ScriptManager id="CATScriptManager" runat="server">
        </asp:ScriptManager>
        <asp:UpdatePanel id="CATUpdatePanel" runat="server">
            <contenttemplate>
<SCRIPT language="javascript" type="text/javascript">
	  
   function ShowPage(id)
   {
    var arg = null;
  
     var top=(screen.height-350)/2;
     var left=(screen.width-800)/2;
     
     arg =  window.showModalDialog('EditCAT.aspx?id='+id,'','dialogHeight:350px;dialogWidth:800px;dialogTop:'+top+';dialogLeft:'+left+';center:Yes;scroll:no;hidden;resizable:no;status:no;');
   
     if(arg != null)
     {
		document.getElementById('<%=returnvalue.ClientID%>').value   = arg[0];
     }
  }
  
  function ShowAssignmentPage(id)
   {
    var arg = null;
  
     var top=(screen.height-280)/2;
     var left=(screen.width-800)/2;
     
     arg =  window.showModalDialog('ChangeAssignment.aspx?type='+id,'','dialogHeight:280px;dialogWidth:800px;dialogTop:'+top+';dialogLeft:'+left+';center:Yes;scroll:no;hidden;resizable:no;status:no;');
   
     if(arg != null)
     {
		document.getElementById('<%=returnvalue.ClientID%>').value   = arg[0];
     }
  }
  

                </SCRIPT>

    <INPUT id="returnvalue" type=hidden name="returnvalue" runat="server" /> 
        <TABLE align="center" width="95%">
            <TR>
                <TD vAlign="middle" align="left">
                    <TABLE height="45" width="100%">
                        <TR>
                            <TD align=right height=10>
                                <asp:Button id="ChangeButton" runat="server" Text="转换(Change)" CssClass="bgButton"></asp:Button>&nbsp; 
                                <asp:Button id="btnadd" runat="server" Text="添加(Add)" CssClass="bgButton" ToolTip="添加CAT"></asp:Button>
                            </TD>
                         </TR>
                     </TABLE>
                 </TD>
             </TR>
             <TR>
                <TD vAlign=middle align=center width="100%" height="100%">
                    <DIV style="OVERFLOW: auto" id="divReport" runat="server">

                        <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
                            <TR>
                                <TD style="HEIGHT: 100%" vAlign=middle align=right>
                                    <asp:GridView id="gvCAT" runat="server" Width="100%" PageSize="20" OnRowDataBound="gvCAT_RowDataBound" DataKeyNames="CATID" AutoGenerateColumns="False">
                                        <PagerSettings Visible="False"></PagerSettings>
                                        <Columns>
                                            <asp:BoundField HtmlEncode="False" DataField="CATCode" HeaderText="编码&lt;br/&gt;Code">
                                                <ItemStyle HorizontalAlign="Center"></ItemStyle>
                                            </asp:BoundField>
                                            <asp:BoundField HtmlEncode="False" DataField="CATCode_Shortening" HeaderText="编码缩写&lt;br/&gt;ShortCode">
                                                <ItemStyle HorizontalAlign="Center"></ItemStyle>
                                            </asp:BoundField>
                                            <asp:BoundField HtmlEncode="False" DataField="CATName" HeaderText="CAT名称&lt;br/&gt;CAT Name">
                                                <ItemStyle HorizontalAlign="Center"></ItemStyle>
                                            </asp:BoundField>
                                            <asp:BoundField HtmlEncode="False" DataField="SortNumber" HeaderText="排号&lt;br/&gt;SortNumber">
                                                <ItemStyle HorizontalAlign="Center"></ItemStyle>
                                            </asp:BoundField>
                                            <asp:CheckBoxField ReadOnly="True" DataField="Active" HeaderText="是否可用&lt;br/&gt;Active">
                                                <ItemStyle HorizontalAlign="Center"></ItemStyle>
                                            </asp:CheckBoxField>
                                            <asp:TemplateField HeaderText="编辑&lt;br/&gt;Edit">
                                                <ItemStyle HorizontalAlign="Center"></ItemStyle>
                                                <ItemTemplate>
                                                    <asp:ImageButton ID="imgedit" runat="server" ImageUrl="../images/COMEDIT.GIF" ToolTip="编辑CAT信息" />
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                        </Columns>
                                        <RowStyle Height="20px" CssClass="table_row_1"></RowStyle>
                                        <SelectedRowStyle CssClass="SelectedRow"></SelectedRowStyle>
                                        <HeaderStyle CssClass="table_header"></HeaderStyle>
                                        <AlternatingRowStyle CssClass="table_row_2"></AlternatingRowStyle>
                                     </asp:GridView> 
                                 </TD>
                               </TR>
 
                          
                        </TABLE>
                    </DIV>
                </TD>
            </TR>
         
         </TABLE>

</contenttemplate>
        </asp:UpdatePanel>
        
    </div>

    <script language="javascript">
    window.attachEvent("onresize",resizeFunc1); 
    resizeFunc1();
    function resizeFunc1()
    {
        var parentWin=window.parent;
        if (parentWin!=null)
        {
            var ofrm=parentWin.document.getElementById("main");
            if (ofrm!=null)
            {
            
                var sHeight=ofrm.document.body.offsetHeight;
                var sWidth=ofrm.document.body.offsetWidth;
                var divReport=document.getElementById("ctl00_ContentPlaceHolder1_divReport");
                if (divReport!=null)
                {
                    divReport.style.width=sWidth-220;
                    divReport.style.height=sHeight-190;
                }
            }
        }
    } 
    </script>

</asp:Content>
